#ifndef _Temporaire_hpp
#define _Temporaire_hpp

#include <iostream>
#include "Categorie.hpp"
#include "string.h"
using std::string;
using std::cout;
using std::endl;

class Temporaire : public Categorie{
public:

    Temporaire(){
        TYPE = Categorie::TEMPORAIRE;
        mType = NULL;
    }
    ~Temporaire(){
    }

void setType(int t){
        //initType();
        switch (t) {
            case Type::TYPE_INTEGER:
                this->mType = new TypeInteger();
                break;
            case Type::TYPE_REAL:
                this->mType = new TypeReal();
                break;
            case Type::TYPE_BOOL:
                this->mType = new TypeBool();
                break;
            case Type::TYPE_STRING:
                this->mType = new TypeString();
                break;
            case Type::TYPE_CHAR:
                this->mType = new TypeChar();
                break;
            default:
                break;
        }
}

void printLine(){
	cout << "Temporaire ";
	    
		cout << "type :";
	    if(mType != NULL){
	        if(mType->CODE_TYPE == Type::TYPE_INTEGER){
	            cout << "integer";
	        }else if(mType->CODE_TYPE == Type::TYPE_REAL ){
	            cout << "real";
	        }else if(mType->CODE_TYPE == Type::TYPE_STRING ){
	            cout << "string";
	        }else if(mType->CODE_TYPE == Type::TYPE_CHAR ){
	            cout << "char";
	        }else if(mType->CODE_TYPE == Type::TYPE_BOOL ){
	            cout << "boolean";
	        }else{
	            cout << "default type";
	        }
	    }else{
	        cout << "NULL";
	    }
	    cout << endl;
}
private:
   	Type* mType;
};


#endif

